#include "Defs.h"
#include "Memory.h"


void * Memory_T::Alloc(unsigned int size)
{
	void * pv = ALLOC(size);
	if( !pv )
	{
		throw Exception_T(GetLastError(), "Error %d ALLOC(%d) - %s - %d - %s", GetLastError(), size, __FILE__, __LINE__, __FUNCSIG__);
	}

	return pv;
}

void * Memory_T::ReAlloc(void * var, unsigned int size)
{
	void * pv = REALLOC(var, size);
	if( !pv )
	{
		throw Exception_T(GetLastError(), "Error %d REALLOC(%d) - %s - %d - %s", GetLastError(), size, __FILE__, __LINE__, __FUNCSIG__);
	}

	return pv;
}
